package com.zbkj.service.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zbkj.common.model.client.digital.CustomVoice;
import com.zbkj.common.model.client.workbench.VideoTemplateFinal;
import com.zbkj.service.dao.client.CustomVoiceDao;
import com.zbkj.service.dao.client.VideoTemplateFinalDao;
import com.zbkj.service.service.VideoTemplateFinalService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class VideoTemplateFinalServiceImpl extends ServiceImpl<VideoTemplateFinalDao, VideoTemplateFinal> implements VideoTemplateFinalService {


    @Autowired
    private VideoTemplateFinalDao videoTemplateFinalDao;

    /**
     * 获取
     * @param userId
     * @return
     */
    @Override
    public Integer countVideoTemplateByUserId(Integer userId) {
        QueryWrapper<VideoTemplateFinal> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("is_del", 0)
                .eq("user_id", userId)
                .eq("is_folder", 0);
        return videoTemplateFinalDao.selectCount(queryWrapper);
    }
}